.class public Lrexsee/flash/FlashView;
.super Landroid/webkit/WebView;
.source "FlashView.java"


# instance fields
.field private flashSurface:Landroid/view/SurfaceView;


# direct methods
.method public constructor <init>(Lrexsee/core/browser/Browser;Ljava/lang/String;)V
    .locals 9
    .param p1, "browser"    # Lrexsee/core/browser/Browser;
    .param p2, "swf"    # Ljava/lang/String;

    .prologue
    const/4 v1, 0x0

    const/4 v8, 0x0

    const/4 v7, 0x1

    const-string v4, "utf-8"

    .line 17
    invoke-virtual {p1}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-direct {p0, v0}, Landroid/webkit/WebView;-><init>(Landroid/content/Context;)V

    .line 19
    invoke-virtual {p2}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v0

    const-string v2, ".swf"

    invoke-virtual {v0, v2}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 20
    invoke-direct {p0, p2}, Lrexsee/flash/FlashView;->getHtml(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    const-string v3, "text/html"

    const-string v0, "utf-8"

    move-object v0, p0

    move-object v5, v1

    invoke-virtual/range {v0 .. v5}, Lrexsee/flash/FlashView;->loadDataWithBaseURL(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 24
    :goto_0
    invoke-virtual {p0}, Lrexsee/flash/FlashView;->bringToFront()V

    .line 25
    invoke-virtual {p0, v7}, Lrexsee/flash/FlashView;->setSaveEnabled(Z)V

    .line 26
    new-instance v0, Lrexsee/flash/FlashView$1;

    invoke-direct {v0, p0}, Lrexsee/flash/FlashView$1;-><init>(Lrexsee/flash/FlashView;)V

    invoke-virtual {p0, v0}, Lrexsee/flash/FlashView;->setWebViewClient(Landroid/webkit/WebViewClient;)V

    .line 49
    const/high16 v0, 0x2000000

    invoke-virtual {p0, v0}, Lrexsee/flash/FlashView;->setScrollBarStyle(I)V

    .line 50
    invoke-virtual {p0, v8}, Lrexsee/flash/FlashView;->setVerticalScrollBarEnabled(Z)V

    .line 51
    invoke-virtual {p0, v8}, Lrexsee/flash/FlashView;->setHorizontalScrollBarEnabled(Z)V

    .line 52
    invoke-virtual {p0, v8}, Lrexsee/flash/FlashView;->setInitialScale(I)V

    .line 53
    invoke-virtual {p0}, Lrexsee/flash/FlashView;->getSettings()Landroid/webkit/WebSettings;

    move-result-object v6

    .line 54
    .local v6, "websettings":Landroid/webkit/WebSettings;
    invoke-virtual {v6, v7}, Landroid/webkit/WebSettings;->setNeedInitialFocus(Z)V

    .line 55
    invoke-virtual {v6, v7}, Landroid/webkit/WebSettings;->setJavaScriptEnabled(Z)V

    .line 56
    invoke-virtual {v6, v7}, Landroid/webkit/WebSettings;->setPluginsEnabled(Z)V

    .line 57
    invoke-virtual {v6, v8}, Landroid/webkit/WebSettings;->setBuiltInZoomControls(Z)V

    .line 58
    invoke-virtual {v6, v8}, Landroid/webkit/WebSettings;->setSupportZoom(Z)V

    .line 59
    invoke-virtual {v6, v7}, Landroid/webkit/WebSettings;->setAllowFileAccess(Z)V

    .line 60
    invoke-virtual {v6, v7}, Landroid/webkit/WebSettings;->setAppCacheEnabled(Z)V

    .line 61
    invoke-virtual {v6, v7}, Landroid/webkit/WebSettings;->setLoadWithOverviewMode(Z)V

    .line 62
    const-string v0, "utf-8"

    invoke-virtual {v6, v4}, Landroid/webkit/WebSettings;->setDefaultTextEncodingName(Ljava/lang/String;)V

    .line 64
    return-void

    .line 22
    .end local v6    # "websettings":Landroid/webkit/WebSettings;
    :cond_0
    invoke-virtual {p0, p2}, Lrexsee/flash/FlashView;->loadUrl(Ljava/lang/String;)V

    goto :goto_0
.end method

.method static synthetic access$0(Lrexsee/flash/FlashView;Landroid/view/SurfaceView;)V
    .locals 0

    .prologue
    .line 13
    iput-object p1, p0, Lrexsee/flash/FlashView;->flashSurface:Landroid/view/SurfaceView;

    return-void
.end method

.method static synthetic access$1(Lrexsee/flash/FlashView;)Landroid/view/SurfaceView;
    .locals 1

    .prologue
    .line 13
    iget-object v0, p0, Lrexsee/flash/FlashView;->flashSurface:Landroid/view/SurfaceView;

    return-object v0
.end method

.method private getHtml(Ljava/lang/String;)Ljava/lang/String;
    .locals 3
    .param p1, "swf"    # Ljava/lang/String;

    .prologue
    .line 67
    const-string v0, "<html><head><title></title><head>"

    .line 68
    .local v0, "rtn":Ljava/lang/String;
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "<body bgcolor=\'#000000\' align=\'center\' style=\'margin:0px;\'>"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 69
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "<div class=\'rexseeFlashDiv\'>"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 70
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "<embed src=\'"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "\' width=\'100%\' height=\'100%\' scale=\'exactfit\' salign=\'t\' quality=\'low\' type=\'application/x-shockwave-flash\' "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 71
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "pluginspage=\'https://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\' "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 72
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "fullScreenOnSelection=\'false\' allowscriptaccess=\'always\' menu=\'true\' play=\'true\'>"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 73
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "</embed>"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 74
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "</div></body></html>"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 75
    return-object v0
.end method
